﻿using Resn.WhuPub.BLL;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace Resn.WhuPub.UnitTest
{
    
    
    /// <summary>
    ///这是 QueryConditionTest 的测试类，旨在
    ///包含所有 QueryConditionTest 单元测试
    ///</summary>
        [TestClass()]
        public class QueryConditionTest
        {


                private TestContext testContextInstance;

                /// <summary>
                ///获取或设置测试上下文，上下文提供
                ///有关当前测试运行及其功能的信息。
                ///</summary>
                public TestContext TestContext
                {
                        get
                        {
                                return testContextInstance;
                        }
                        set
                        {
                                testContextInstance = value;
                        }
                }

                #region 附加测试特性
                // 
                //编写测试时，还可使用以下特性:
                //
                //使用 ClassInitialize 在运行类中的第一个测试前先运行代码
                //[ClassInitialize()]
                //public static void MyClassInitialize(TestContext testContext)
                //{
                //}
                //
                //使用 ClassCleanup 在运行完类中的所有测试后再运行代码
                //[ClassCleanup()]
                //public static void MyClassCleanup()
                //{
                //}
                //
                //使用 TestInitialize 在运行每个测试前先运行代码
                //[TestInitialize()]
                //public void MyTestInitialize()
                //{
                //}
                //
                //使用 TestCleanup 在运行完每个测试后运行代码
                //[TestCleanup()]
                //public void MyTestCleanup()
                //{
                //}
                //
                #endregion


                /// <summary>
                ///QueryCondition`1 构造函数 的测试
                ///</summary>
                public void QueryConditionConstructorTestHelper<T>()
                {
                        string queryName = string.Empty; // TODO: 初始化为适当的值
                        CompareType compareType = new CompareType(); // TODO: 初始化为适当的值
                        object queryValue = null; // TODO: 初始化为适当的值
                        QueryCondition<T> target = new QueryCondition<T>(queryName, compareType, queryValue);
                        Assert.Inconclusive("TODO: 实现用来验证目标的代码");
                }

                [TestMethod()]
                public void QueryConditionConstructorTest()
                {
                        QueryConditionConstructorTestHelper<GenericParameterHelper>();
                }

                /// <summary>
                ///GenerateLambdaDelegate 的测试
                ///</summary>
                public void GenerateLambdaDelegateTestHelper<T>()
                {
                        string queryName = string.Empty; // TODO: 初始化为适当的值
                        CompareType compareType = new CompareType(); // TODO: 初始化为适当的值
                        object queryValue = null; // TODO: 初始化为适当的值
                        QueryCondition<T> target = new QueryCondition<T>(queryName, compareType, queryValue); // TODO: 初始化为适当的值
                        Func<T, bool> expected = null; // TODO: 初始化为适当的值
                        Func<T, bool> actual;
                        actual = target.GenerateLambdaDelegate();
                        Assert.AreEqual(expected, actual);
                        Assert.Inconclusive("验证此测试方法的正确性。");
                }

                [TestMethod()]
                public void GenerateLambdaDelegateTest()
                {
                        GenerateLambdaDelegateTestHelper<GenericParameterHelper>();
                }

                /// <summary>
                ///ClassType 的测试
                ///</summary>
                public void ClassTypeTestHelper<T>()
                {
                        PrivateObject param0 = null; // TODO: 初始化为适当的值
                        QueryCondition_Accessor<T> target = new QueryCondition_Accessor<T>(param0); // TODO: 初始化为适当的值
                        Type expected = null; // TODO: 初始化为适当的值
                        Type actual;
                        target.ClassType = expected;
                        actual = target.ClassType;
                        Assert.AreEqual(expected, actual);
                        Assert.Inconclusive("验证此测试方法的正确性。");
                }

                [TestMethod()]
                [DeploymentItem("Resn.WhuPub.BLL.dll")]
                public void ClassTypeTest()
                {
                        ClassTypeTestHelper<GenericParameterHelper>();
                }

                /// <summary>
                ///CompareType 的测试
                ///</summary>
                public void CompareTypeTestHelper<T>()
                {
                        PrivateObject param0 = null; // TODO: 初始化为适当的值
                        QueryCondition_Accessor<T> target = new QueryCondition_Accessor<T>(param0); // TODO: 初始化为适当的值
                        CompareType expected = new CompareType(); // TODO: 初始化为适当的值
                        CompareType actual;
                        target.CompareType = expected;
                        actual = target.CompareType;
                        Assert.AreEqual(expected, actual);
                        Assert.Inconclusive("验证此测试方法的正确性。");
                }

                [TestMethod()]
                [DeploymentItem("Resn.WhuPub.BLL.dll")]
                public void CompareTypeTest()
                {
                        CompareTypeTestHelper<GenericParameterHelper>();
                }

                /// <summary>
                ///PropertyName 的测试
                ///</summary>
                public void PropertyNameTestHelper<T>()
                {
                        PrivateObject param0 = null; // TODO: 初始化为适当的值
                        QueryCondition_Accessor<T> target = new QueryCondition_Accessor<T>(param0); // TODO: 初始化为适当的值
                        string expected = string.Empty; // TODO: 初始化为适当的值
                        string actual;
                        target.PropertyName = expected;
                        actual = target.PropertyName;
                        Assert.AreEqual(expected, actual);
                        Assert.Inconclusive("验证此测试方法的正确性。");
                }

                [TestMethod()]
                [DeploymentItem("Resn.WhuPub.BLL.dll")]
                public void PropertyNameTest()
                {
                        PropertyNameTestHelper<GenericParameterHelper>();
                }

                /// <summary>
                ///QueryName 的测试
                ///</summary>
                public void QueryNameTestHelper<T>()
                {
                        PrivateObject param0 = null; // TODO: 初始化为适当的值
                        QueryCondition_Accessor<T> target = new QueryCondition_Accessor<T>(param0); // TODO: 初始化为适当的值
                        string expected = string.Empty; // TODO: 初始化为适当的值
                        string actual;
                        target.QueryName = expected;
                        actual = target.QueryName;
                        Assert.AreEqual(expected, actual);
                        Assert.Inconclusive("验证此测试方法的正确性。");
                }

                [TestMethod()]
                [DeploymentItem("Resn.WhuPub.BLL.dll")]
                public void QueryNameTest()
                {
                        QueryNameTestHelper<GenericParameterHelper>();
                }

                /// <summary>
                ///QueryValue 的测试
                ///</summary>
                public void QueryValueTestHelper<T>()
                {
                        PrivateObject param0 = null; // TODO: 初始化为适当的值
                        QueryCondition_Accessor<T> target = new QueryCondition_Accessor<T>(param0); // TODO: 初始化为适当的值
                        object expected = null; // TODO: 初始化为适当的值
                        object actual;
                        target.QueryValue = expected;
                        actual = target.QueryValue;
                        Assert.AreEqual(expected, actual);
                        Assert.Inconclusive("验证此测试方法的正确性。");
                }

                [TestMethod()]
                [DeploymentItem("Resn.WhuPub.BLL.dll")]
                public void QueryValueTest()
                {
                        QueryValueTestHelper<GenericParameterHelper>();
                }
        }
}
